home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------
- "cnet.device" PCMCIA ethernet card driver for A600/A1200
- --------------------------------------------------------
- pre-V1.2 by Bruce Abbott <bhabbott@inhb.co.nz>
- V1.2 by Harry "Piru" Sintonen <sintonen@iki.fi>
-
-
- Introduction:
-
- This is an PCMCIA (aka PC Card) ethernet card SANA2 driver for
- Amiga 600 and Amiga 1200 computers. Most NE2000 compatible cards
- are supported (I hope).
-
-
- Requirements:
-
- - A compatible PCMCIA ethernet card (see the compatibility list).
-
- - An Amiga 1200 or Amiga 600. A1200's need a hardware mod (see
- A1200mod.txt).
-
- - Network software. Tested with Genesis 1.0.6 and MiamiDx 1.0c.
-
- - A network, obviously. :-)
-
-
- Usage:
-
- Four different versions of cnet.device are provided:
-
- - cnet.device.000 - 68000 version, for stock A600s.
- - cnet.device - 68020 version, for 68020+ CPUs.
- - cnet.device.turboio - 68020 version with DMA speedup hack, for
- 68020+ CPUs.
- - cnet.device.debug - 68020 version with debug output to debug
- terminal enabled, use sashimi to capture.
-
- The 68000 version is intended to be used with unexpanded A600. The
- 68020 version is for machines with 68020 or better CPU.
-
- The `turboio' version has a special speedup hack implemented (tech:
- it uses longword access to 16-bit hardware register) that in most
- cases give better performance than the regular 68020 version.
- However some beta testers reported that the regular version is faster.
- Do your own benchmarking to figure out which one is faster for you.
- If you don't care that much about the speed (the speed difference is
- quite minor anyway) then just pick the regular version.
-
- If cnet.device fail to work properly `cnet.device.debug' probably can
- help. It includes full line debug information and has extensive debug
- output to debugging terminal. The output can be captured with sashimi.
- Such sashimi log is recommended when reporting device bugs.
-
-
- Simply copy the preferred version of "cnet.device" to where you want
- it (usually "DEVS:networks/cnet.device") and set up your network
- software for an ethernet driver. For AmiTCP 3.0 this would involve
- editing the "interfaces" file and adding a line like
- "cnet dev = devs:networks/cnet.device". Then you would start it up
- with "ifconfig cnet0 192.168.0.1".
-
- With Genesis and Miami(Dx) setup is really easy, use provided
- installation "wizard" to set up the network. Choose SANA2 type for
- device driver, then choose `DEVS:networks/cnet.device', unit 0.
-
-
- About Netax1200:
-
- Netax1200 card somes with its own driver called `netax.device'. This
- basically is old cnet.device, so Netax1200 users can use cnet.device
- instead.
-
-
- Performance:
-
- My network consists of an A1200 603e+/240MHz/060/50MHz connected via
- coax cable to a P120 laptop. Software on the Amiga is AmigaOS 3.5 +
- Genesis 1.0.6 and on the laptop Debian 2.2. The amiga has Apollo RE450CT
- pcmcia card and the laptop has 3com EtherLink III pcmcia card. FTP
- download from laptop have reached 771Kbytes/Sec. On overclocked 060
- systems speeds of >819Kbytes/Sec have been reported.
-
- <flame>
- Note that Miami and MiamiDx are a lot slower than AmiTCP/IP based
- (Genesis) systems! Nothing can be done to help here, complaints to
- Mr Kruse of nordicglobal <kruse@nordicglobal.com>. And NO I will NOT
- make MNI driver for Miami(Dx) because for some lame excuse MNI devkit
- is kept private! (aargh)
-
- My advice is: use the better protocol stack, Genesis.
- </flame>
-
-
- Limitations:
-
- A1200s require an internal modification to the CreditCardReset line
- to ensure correct card initialisation. If you haven't done this mod,
- you may need to wait until after powering up your A1200 before plugging
- the card in. If the 'Link' LED stays on but you are using coax cable,
- this indicates that the card is NOT working properly. Also, sometimes
- the card can appear to be OK but still doesn't work correctly.
-
-
- Surf Squirrel Problems:
-
- The Surf Squirrel SCSI/Serial adapter is not a proper PCMCIA card, and
- has no attribute memory. Unfortunately, its driver takes over the PCMCIA
- port and prevents other drivers from owning their cards. This will happen
- whenever squirrelscsi.device is opened, even if the Surf Squirrel card is
- never plugged in!
-
-
- Card_info Diagnostic Tool:
-
- The `card_info' program can be used to identify a PCMCIA card, and
- will display a summary of its attributes. It also produces a binary
- dump of the attribute and I/O memory, which can be analysed for more
- detailed information. `card_info' is quite useful as it can be used to
- find out if the card and the hardware mod work.
-
-
- Example Network Files:
-
- Because many people seem to have trouble setting up an Ethernet network,
- I have included a copy of my own network configuration and startup script
- files, which you can use as a template for your own installation. Please
- change the username etc. to suit. (These files are by Bruce Abbott
- <bhabbott@inhb.co.nz>, nowadays quite obsolete since both major Amiga
- TCP/IP stacks have installation "wizard")
-
-
- Building:
-
- src directory contains the full source code for cnet.device. You need
- standard make, phxass, phxlnk and os-includes to compile. Everything
- needed excluding os-includes are available on aminet. os-includes are
- available on devcd2.1 for example. After installing make, phxass and
- phxlnk within standard path do the following to compile:
-
- > cd src
- > assign os-include: ADCD_2.1:NDK/NDK_3.5/Include/include_i/
- > make
-
- This results four cnet.device binaries to src directory.
-
-
- History:
-
- V0.1 First Aminet Release
-
- - It worked, just.
-
-
- V0.4 Second Aminet Release
-
- - Added several SANAII commands for compatibility with Miami.
-
- - Enabled interrupts during RemoteWrite. Should no longer cause
- serial port overruns.
-
- - Improved error checking in case of card initialisation failure.
- Now doesn't GURU if device is opened twice! Also tested it with
- Enforcer, which did not detect any illegal memory accesses.
-
- - Relaxed hardware address verification to accept the Accton EN2216.
- Now it might possibly work with other 'NE2000 compatible' cards.
-
- - Unrolled loops to improve data transfer speed. Now about 20% faster
- on an unexpanded A600. Code size got bigger as a result :(
-
- - Hack to fix problem with missed interrupts. Now the device clears
- the Gayle interrupt bits instead of letting card.resource do it.
-
-
- V0.5 Third Aminet Release
-
- - Accepts 802.3 packets (probably, untested).
-
- - Sets BROADCAST bit in io_flags when appropriate.
-
- - Now examines PCMCIA attribute memory to determine the value to write
- into the Card Configuration Register. This should work with all NE2000
- compatible PCMCIA network cards, even those with different CCR offsets.
-
- - If attribute memory is not found, cnet.device tries to open the file
- "s:cnetdev.config" and read from it the Card Configuration Register
- offset, Configuration ID, and ROM Station Address. This often revives
- a card that did not power up properly. The 'cnetconfig' program is
- supplied for creating this file.
-
-
- V0.6 Fourth Aminet Release
-
- - Removed cnet.config stuff, and replaced with a hardware mod. This
- mod should be done on all A1200s (not required on the A600).
-
- - Now cards are hot-swappable. As a result, only proper network
- cards will be accepted. Other types of cards are ignored so
- that other drivers can access them.
-
- - I/O addressing now supports a 64KByte range. Previously this was
- only 1KB, which may have prevented some cards from working.
-
- - Accepts all Card Configuration Register address sizes (previously
- the address was assumed to be 16bit, but some cards are 24 bit!).
-
- - Tighter data transfer loops, which are slightly faster on a
- machine with small CPU caches (eg. 68030).
-
- - Un-supported commands now return S2ERR_NOT_SUPPORTED.
-
- - 'card_info' program provided for viewing card attributes.
-
- v0.7 Fifth Aminet Release
-
- - fixed harmless bug in init_nic - remote DMA timeout test
- could not fail!
-
- - Now remembers copytobuf/copyfrombuf tags for each opener.
- Allows simultaneous use of eg. AmiTCP and Envoy.
-
- - OnEvent types ONLINE and OFFLINE now return immediately
- if the device is already in the wanted state.
-
- v0.9 Sixth Aminet release
-
- - fixed bug in OnEvent: was using wrong register to test ONLINE flag.
-
- - Added support for multicasting, statistics, orphan packets, exclusive
- and promiscuous modes.
-
- v1.0 Seventh Aminet release
-
- - Fixed bug in readpacket: Broadcast packets were also being identified
- as Multicast.
-
- v1.1 Eigth Aminet release
-
- - Fixed bug: delmulticast always failed due to bad testing
- for multicast address match.
-
- - Fixed bug: readpacket was getting incorrect src and dst
- addresses (A4 was pointing to prhdr instead of etherhdr).
-
- - Included put_multi in init_nic (need to reload multicast
- bits if card is removed and re-inserted)
-
- - Added 4 to rx ios2_datalength in raw mode. Shapeshifter
- seems to need this (why?)
-
- v1.2 Ninth Aminet release
-
- - Since there has been almost ten months without an update, I, Harry
- Sintonen <sintonen@iki.fi>, decided to have a go.
-
- - Dozens of bugs fixed.
-
- - Now comply to SANA2 Rev2 and Rev3. Also implements Multicast address
- range extensions to Rev3.
-
- - Properly implements Multiple Protocol Stack Support.
-
- - cnet.device is now NewStyleDevice.
-
- - cnet.device can now be expunged from the memory.
-
- - Separate 68000 and 68020 versions. Special turboio version with DMA
- speedup hack.
-
- - Optimized for better performance.
-
- - Thanks to v1.2 beta testers: darza, sda, shygirl, kolla, BlackWine,
- miksuh, Nadir, tekmag, goat^god, Tripper, Tundrah, Ion and Janne_k.
- Special thanks to Tundrah for providing very extensive benchmark
- results.
-
- (for more information see src/cnetdevice.asm version history)
-
-
- Legal Mush:
-
- Original note by Bruce Abbott <bhabbott@inhb.co.nz>:
-
- <quote>
-
- To encourage further development in PC-CARD devices for the Amiga, I am
- placing the source code for this project into the Public Domain. You
- can freely use or abuse it as you wish. I have also included some other
- authors' code for reference purposes, please respect their copyrights.
-
- Please note that this driver is not a finished product, and is almost
- certain to harbour a few bugs. Thus I will not be held responsible for
- any loss or injury that you may incur while using it.
-
- I cannot guarantee compatibility with your system. All I can say is it
- works for me.
-
- </quote>
-
- Special thanks go to Bruce Abbott for making cnet.device public domain.
- This `legal mush' quote still applies, although I tried to remove as
- many bugs as I could. cnet.device v1.2 is still public domain and full
- source code is included. Enjoy!
-
- - Harry "Piru" Sintonen, 25th May 2000.
-